const colorArr = ["#218de0", "#5d5cda"];
const colorAlpha = ["rgba(60,170,211,0.05)", "rgba(194,153,39,0.05)"];
export const getRepresentativeSexOption = () => {
  return {
    title: {
      top: 15,
      left: 10,
      textStyle: {
        fontSize: 16,
        color: "#fff",
      },
      text: "代表男女比例",
    },
    tooltip: {
      trigger: "item",
      formatter: "{b} : {c} ({d}%)",
    },
    legend: {
      orient: "horizontal",
      bottom: 10,
      textStyle: {
        color: "#fff",
        padding: [0, 0, 0, -32],
        fontSize: 10,
      },
      itemWidth: 33,
      itemHeight: 22,
    },

    polar: {
      radius: "70%",
    },
    angleAxis: {
      interval: 1,
      type: "category",
      data: [],
      z: 10,
      axisLine: {
        show: true,
        lineStyle: {
          color: "#0B4A6B",
          width: 1,
          type: "solid",
        },
      },
      axisLabel: {
        interval: 0,
        show: true,
        color: "#0B4A6B",
        margin: 8,
        fontSize: 16,
      },
    },
    radiusAxis: {
      min: 20,
      max: 120,
      interval: 20,
      axisLine: {
        show: false,
        lineStyle: {
          color: "#0B3E5E",
          width: 1,
          type: "solid",
        },
      },
      axisLabel: {
        formatter: "{value} %",
        show: false,
        padding: [0, 0, 20, 0],
        color: "#0B3E5E",
        fontSize: 16,
      },
      splitLine: {
        lineStyle: {
          color: "#07385e",
          width: 2,
          type: "dashed",
        },
      },
    },
    calculable: true,
    series: [
      {
        stack: "a",
        type: "pie",
        radius: "70%",
        center: ["50%", "50%"],
        roseType: "radius",
        zlevel: 10,
        startAngle: 100,
        label: {
          formatter: ["{b|{b}}", "{c|{c}人}", "{d|占比 {d}%}"].join("\n"),
          rich: {
            b: {
              color: "#3bd2fe",
              fontSize: 14,
              lineHeight: 20,
            },
            d: {
              color: "#d0fffc",
              fontSize: 14,
              height: 20,
            },
            c: {
              color: "#d0fffc",
              fontSize: 14,
              height: 20,
            },
          },
        },
        emphasis: {
          show: false,
        },
        labelLine: {
          show: true,
          length: 10,
          length2: 45,
          lineStyle: {
            color: "#0096b1",
          },
        },
        data: [
          {
            value: 523,
            name: "男生",
            itemStyle: {
              borderColor: colorArr[0],
              borderWidth: 2,
              shadowBlur: 20,
              shadowColor: "#41a8f8",
              shadowOffsetx: 25,
              shadowOffsety: 20,
              color: colorAlpha[0],
            },
          },
          {
            value: 217,
            name: "女生",
            itemStyle: {
              borderColor: colorArr[1],
              borderWidth: 2,
              shadowBlur: 20,
              shadowColor: colorArr[1],
              shadowOffsetx: 25,
              shadowOffsety: 20,
              color: colorAlpha[1],
            },
          },
        ],
      },
    ],
  };
};
